package com.wwtech.epp.ui.activity.main.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.main.InformFragment;
import com.wwtech.epp.ui.activity.main.contract.InformContract;
import com.wwtech.epp.ui.activity.main.presenter.InformPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.main
 * @Description: The moduele of InformFragment, provide field for InformFragment
 * @date 2017/08/21 11:13:14
 */
@Module
public class InformModule {
    private final InformContract.View mView;


    public InformModule(InformContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public InformPresenter provideInformPresenter(HttpAPIWrapper httpAPIWrapper, InformFragment mFragment) {
        return new InformPresenter(httpAPIWrapper, mView, mFragment);
    }

    @Provides
    @ActivityScope
    public InformFragment provideInformFragment() {
        return (InformFragment) mView;
    }

}